@import url("admin-slide-nav.css");

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background-color: #000;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
}

header ul {
  display: flex;
  flex-direction: row;
  list-style-type: none;
  padding: 0 12px;
}

header li {
  margin-right: 22px;
  padding: 7px 0;
}

header a {
  color: #fff;
  text-decoration: none;
}

header a:hover {
  text-decoration: underline;
  color: #fff;
}

nav ul {
  margin: 0;
}

#hamburger {
  color: #fff;
  margin: 0.6em;
  font-size: 1.3em;
  cursor: pointer;
}

header > div {
  margin-right: 12px;
}

header .fa {
  margin: 0 12px;
  font-size: 1.3em;
}

.wrapper {
  flex: 1;
  display: flex;
  flex-direction: row;
}

.wrapper > div:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#sidebar,
main,
footer > div {
  padding: 12px;
}

#left-nav ul {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: stretch;
  padding-left: 19px;
}

#left-nav li {
  width: 100%;
}

#left-nav li a {
  color: #555;
  font-weight: bold;
  text-decoration: none;
}

#left-nav li a:hover {
  text-decoration: underline;
}

.hide-sm {
  display: none;
}

main {
  padding-right: 1em;
}

footer {
  background-color: black;
  color: #fff;
  display: flex;
  flex-direction: column;
}

footer > div:nth-child(1) {
  background-color: #5b5b5b;
  min-height: 80px;
}

.alt {
  background-color: transparent !important;
  border: 1px solid var(--border);
  color: #333;
}

.alt:hover {
  border: 1px solid #777;
  color: var(--primary-darker);
}

.danger {
  background-color: #ee0000;
  border: 1px solid #dd0000;
}

.danger:hover {
  background-color: #cc0000;
  border: 1px solid #cc0000;
}

button,
.button {
  background-color: var(--primary);
  border: 1px solid var(--primary-darker);
  border-radius: 0;
  text-transform: uppercase;
}

button:hover,
.button:hover {
  background-color: var(--primary-darker);
  border: 1px solid var(--primary-darker);
}

button .fa,
.button .fa {
  margin-right: 7px;
}

input[type="text"],
input[type="email"],
input[type="password"],
button,
textarea,
select {
  border-radius: 0;
}

textarea {
  min-height: 140px;
}

th {
  background-color: var(--primary);
  border: 1px solid var(--primary-darker);
  text-align: left;
  font-weight: normal;
  font-size: 0.8em;
  color: #fff;
}

#results-tbl > thead > tr:nth-child(1) > th {
  padding: 0.4em;
}

#results-tbl > thead > tr:nth-child(1) > th > div {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

#results-tbl form {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

#results-tbl
  > thead
  > tr:nth-child(1)
  > th
  > div
  > div:nth-child(1)
  > form
  > button.alt {
  margin: 0 4px;
  background-color: #eee !important;
  border: 1px solid var(--primary-darker);
  text-transform: none;
}

#results-tbl > thead > tr:last-child > th:last-child {
  width: 20px;
}

#results-tbl > tbody > tr > td:nth-child(2) > a {
  margin: 4px;
}

#results-tbl > thead input[type="text"] {
  border: 1px solid var(--primary-darker);
}

#results-tbl > thead > tr:nth-child(1) > th > div > div:nth-child(2) > select {
  border: 1px solid var(--primary-darker);
  width: 5em;
}

thead tr:nth-child(2) th {
  font-size: 1em;
}

td {
  border: 1px #36658c solid;
  padding: 0.7em;
}

td:last-child {
  font-size: 0.8em;
  padding: 0;
  vertical-align: middle;
  text-align: center;
}

td:last-child button,
td:last-child .button {
  margin: 0;
}

.smaller {
  font-size: 0.6em;
}

#comments-block {
  padding: 0;
  margin: 0;
}

#comments-block p {
  margin: 1em;
  text-align: left;
}

#comments-block p:nth-child(1) {
  font-size: 12px;
}

#comments-block p:nth-child(2) {
  font-size: 15px;
}

.two-col {
  display: grid;
  grid-gap: 1em;
  grid-template-columns: 1fr 1fr;
}

.three-col {
  display: grid;
  grid-gap: 1em;
  grid-template-columns: 1fr 1fr 1fr;
}

.card.record-details > div.card-body > div {
  padding: 0.6em;
  border-bottom: 1px dotted var(--border);
}

.card.record-details > div.card-body > div:nth-last-child(1) {
  border: 0;
}

.card.record-details > div.card-body > div > span:nth-child(odd) {
  text-align: left;
  font-weight: bold;
}

.card.record-details > div.card-body > div > span:nth-child(even) {
  float: right;
}

.record-details .row {
  display: grid;
  grid-gap: 0;
  grid-template-columns: repeat(2, 1fr);
  border-bottom: 1px dotted var(--border);
}

.record-details .row > div {
  padding: 0.6em;
}

.record-details .row:nth-last-child(1) {
  border: 0;
}

.record-details .row > div:nth-child(odd) {
  font-weight: bold;
}

.record-details .row > div:nth-child(even) {
  text-align: right;
}

.record-details .row > .full-width {
  grid-column: 1/3;
}

.record-details .full-width > div {
  font-weight: normal;
}

.record-details .full-width div:nth-child(2) {
  margin-top: 1em;
}

.card-create-relation p {
  text-align: center;
  margin: 0 auto;
}

.card-create-relation button {
  margin: 0 auto 1em auto;
}

#gallery-pics {
  margin-top: 33px;
  display: grid;
  grid-gap: 1em;
}

#gallery-pics div {
  text-align: center;
}

#gallery-pics div img {
  max-width: 100%;
  max-height: auto;
  padding: 0.1em;
  cursor: pointer;
}

#preview-pic {
  text-align: center;
}

#preview-pic img {
  max-width: 100%;
  max-height: 450px;
}

.picture-gallery-card {
  text-align: center;
}

.bg-marker {
  background-color: silver;
}

.picture-preview img {
  margin-top: 1.4em;
  max-width: 450px;
  height: auto;
}

@media (min-width: 1px) {
  .bg-marker {
    background-color: red;
  }

  #sidebar {
    display: none;
  }

  h1 {
    font-size: 2.4em;
  }

  h2 {
    font-size: 1.7em;
  }

  #gallery-pics {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (max-width: 560px) {
  main > p {
    display: flex;
    margin: 4px 0;
  }

  #create-btn {
    text-align: center;
    background-color: #fff;
    color: #555;
    font-weight: bold;
    margin-bottom: 3px;
  }

  thead > tr:nth-child(1) > th form input {
    flex: 6;
  }

  thead > tr:nth-child(1) > th form button {
    flex: 1;
    margin-right: 0 !important;
  }

  thead > tr:nth-child(1) > th > div {
    flex-direction: column-reverse !important;
  }

  thead > tr:nth-child(1) > th > div > div:nth-child(2) {
    text-align: right;
  }

  thead > tr:nth-child(1) > th > div > div {
    margin: 3px 0;
  }

  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  #preview-pic-modal > div.modal-body > p:nth-child(2),
  #comment-modal > div.modal-body > p:nth-child(2),
  #delete-modal > div.modal-body > form > p:nth-child(3) {
    display: flex;
    flex-direction: column-reverse;
  }
}

@media (min-width: 560px) {
  .bg-marker {
    background-color: orange;
  }

  #gallery-pics {
    grid-template-columns: repeat(2, 1fr);
  }

  .go-right {
    float: right;
    position: relative;
    display: block;
  }
}

@media (min-width: 840px) {
  .bg-marker {
    background-color: yellow;
  }

  .hide-lg {
    display: none;
  }

  h1 .hide-sm {
    display: inline-block;
  }

  .hide-sm {
    display: block;
  }

  #sidebar {
    display: block;
    background-color: #eee;
    min-width: 250px;
  }

  h1 {
    font-size: 4em;
  }

  h2 {
    font-size: 2em;
  }

  #gallery-pics {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 561px) and (max-width: 1230px) {
  .three-col {
    display: grid;
    grid-gap: 1em;
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1120px) {
  .bg-marker {
    background-color: green;
  }

  #gallery-pics {
    grid-template-columns: repeat(4, 1fr);
  }
}
